package com.vip.other;

import com.vip.shopdao.action.domain.Action;
import com.vip.shopdao.action.domain.ActionKind;
import com.vip.shopdao.admin.domain.Role;
import com.vip.shopdao.admin.domain.User;
import com.vip.shopdao.order.domain.Order;
import com.vip.shopdao.shop.domain.Shop;
import com.vip.shopdao.shop.domain.Size;
import com.vip.shopservice.action.service.ActionKindManager;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;

/**
 * @Classname GenericBaseTestCase
 * @Description TODO
 * @Date 2021/6/9 13:24
 * @Created by HanYuHao
 */
public class GenericBaseTestCase {

    public class UserManager{

        public void save(User u) {
        }
    }

    public class ShopManager implements com.vip.shopservice.shop.service.ShopManager {

        /**
         * * delete entity according given id
         *
         * @param id entity id
         */
        @Override
        public void delete(Long id) {

        }

        @Override
        public void deleteAll(Long[] ids) {

        }

        /**
         * fetch all entities
         *
         * @return list for all entities
         */
        @Override
        public List<Shop> findAll() {
            return null;
        }

        /**
         * @param page pagable structure
         * @return pagable list
         */
        @Override
        public Page<Shop> findAll(Pageable page) {
            return null;
        }

        @Override
        public Page<Shop> findByName(String name, Pageable pageable) {
            return null;
        }

        /**
         * fetch specified entity according id;
         *
         * @param id entity id;
         * @return entity
         */
        @Override
        public Shop findById(Long id) {
            return null;
        }

        /**
         * @param entities entity set to save
         * @return Iterable entity set
         */
        @Override
        public Iterable<Shop> save(Iterable<Shop> entities) {
            System.out.println("Hibernate: select next_val as id_val from hibernate_sequence for update");
            System.out.println("Hibernate: update hibernate_sequence set next_val= ? where next_val=?");
            System.out.println("Hibernate: insert into shop (datecreated, datemodified, action_kind_id, description, name, point, id) values (?, ?, ?, ?, ?, ?, ?)");
            return null;
        }

        /**
         * save specified entity;
         *
         * @param entity entity for saving
         * @return saved domain entity
         */
        @Override
        public Shop save(Shop entity) {
            System.out.println("Hibernate: select next_val as id_val from hibernate_sequence for update");
            System.out.println("Hibernate: update hibernate_sequence set next_val= ? where next_val=?");
            System.out.println("Hibernate: insert into shop (datecreated, datemodified, action_kind_id, description, name, point, id) values (?, ?, ?, ?, ?, ?, ?)");
            return null;
        }

        @Override
        public Shop saveAndFlush(Shop entity) {
            return null;
        }

        @Override
        public Shop findByname(String name) {
            return null;
        }
    }

    public class SizeManager implements com.vip.shopservice.shop.service.SizeManager {

        /**
         * * delete entity according given id
         *
         * @param id entity id
         */
        @Override
        public void delete(Long id) {

        }

        @Override
        public void deleteAll(Long[] ids) {

        }

        /**
         * fetch all entities
         *
         * @return list for all entities
         */
        @Override
        public List<Size> findAll() {
            return null;
        }

        /**
         * @param page pagable structure
         * @return pagable list
         */
        @Override
        public Page<Size> findAll(Pageable page) {
            return null;
        }

        @Override
        public Page<Size> findByName(String name, Pageable pageable) {
            return null;
        }

        /**
         * fetch specified entity according id;
         *
         * @param id entity id;
         * @return entity
         */
        @Override
        public Size findById(Long id) {
            return null;
        }

        /**
         * @param entities entity set to save
         * @return Iterable entity set
         */
        @Override
        public Iterable<Size> save(Iterable<Size> entities) {
            System.out.println("Hibernate: select next_val as id_val from hibernate_sequence for update");
            System.out.println("Hibernate: update hibernate_sequence set next_val= ? where next_val=?");
            System.out.println("Hibernate: insert into size (datecreated, datemodified, action_kind_id, description, name, point, id) values (?, ?, ?, ?, ?, ?, ?)");
            return null;
        }

        /**
         * save specified entity;
         *
         * @param entity entity for saving
         * @return saved domain entity
         */
        @Override
        public Size save(Size entity) {System.out.println("Hibernate: select next_val as id_val from hibernate_sequence for update");
            System.out.println("Hibernate: update hibernate_sequence set next_val= ? where next_val=?");
            System.out.println("Hibernate: insert into size (datecreated, datemodified, action_kind_id, description, name, point, id) values (?, ?, ?, ?, ?, ?, ?)");

            return null;
        }

        @Override
        public Size saveAndFlush(Size entity) {
            return null;
        }
    }

    public class OrderManager implements com.vip.shopservice.order.service.OrderManager {

        /**
         * * delete entity according given id
         *
         * @param id entity id
         */
        @Override
        public void delete(Long id) {

        }

        @Override
        public void deleteAll(Long[] ids) {

        }

        /**
         * fetch all entities
         *
         * @return list for all entities
         */
        @Override
        public List<Order> findAll() {
            return null;
        }

        /**
         * @param page pagable structure
         * @return pagable list
         */
        @Override
        public Page<Order> findAll(Pageable page) {
            return null;
        }

        @Override
        public Page<Order> findByName(String name, Pageable pageable) {
            return null;
        }

        /**
         * fetch specified entity according id;
         *
         * @param id entity id;
         * @return entity
         */
        @Override
        public Order findById(Long id) {
            return null;
        }

        /**
         * @param entities entity set to save
         * @return Iterable entity set
         */
        @Override
        public Iterable<Order> save(Iterable<Order> entities) {
            System.out.println("Hibernate: select next_val as id_val from hibernate_sequence for update");
            System.out.println("Hibernate: update hibernate_sequence set next_val= ? where next_val=?");
            System.out.println("Hibernate: insert into order (datecreated, datemodified, action_kind_id, description, name, point, id) values (?, ?, ?, ?, ?, ?, ?)");
            return null;
        }

        /**
         * save specified entity;
         *
         * @param entity entity for saving
         * @return saved domain entity
         */
        @Override
        public Order save(Order entity) {
            System.out.println("Hibernate: select next_val as id_val from hibernate_sequence for update");
            System.out.println("Hibernate: update hibernate_sequence set next_val= ? where next_val=?");
            System.out.println("Hibernate: insert into order (datecreated, datemodified, action_kind_id, description, name, point, id) values (?, ?, ?, ?, ?, ?, ?)");
            return null;
        }

        @Override
        public Order saveAndFlush(Order entity) {
            return null;
        }
    }

    public class RoleManager implements com.vip.shopservice.admin.service.RoleManager {

        /**
         * * delete entity according given id
         *
         * @param id entity id
         */
        @Override
        public void delete(Long id) {

        }

        @Override
        public void deleteAll(Long[] ids) {

        }

        /**
         * fetch all entities
         *
         * @return list for all entities
         */
        @Override
        public List<Role> findAll() {
            return null;
        }

        /**
         * @param page pagable structure
         * @return pagable list
         */
        @Override
        public Page<Role> findAll(Pageable page) {
            return null;
        }

        @Override
        public Page<Role> findByName(String name, Pageable pageable) {
            return null;
        }

        /**
         * fetch specified entity according id;
         *
         * @param id entity id;
         * @return entity
         */
        @Override
        public Role findById(Long id) {
            return null;
        }

        /**
         * @param entities entity set to save
         * @return Iterable entity set
         */
        @Override
        public Iterable<Role> save(Iterable<Role> entities) {
            System.out.println("Hibernate: select next_val as id_val from hibernate_sequence for update");
            System.out.println("Hibernate: update hibernate_sequence set next_val= ? where next_val=?");
            System.out.println("Hibernate: insert into role (datecreated, datemodified, action_kind_id, description, name, point, id) values (?, ?, ?, ?, ?, ?, ?)");
            return null;
        }

        /**
         * save specified entity;
         *
         * @param entity entity for saving
         * @return saved domain entity
         */
        @Override
        public Role save(Role entity) {
            return null;
        }

        @Override
        public Role saveAndFlush(Role entity) {
            return null;
        }
    }

    public class ActionManager implements com.vip.shopservice.action.service.ActionManager {

        /**
         * * delete entity according given id
         *
         * @param id entity id
         */
        @Override
        public void delete(Long id) {

        }

        @Override
        public void deleteAll(Long[] ids) {

        }

        /**
         * fetch all entities
         *
         * @return list for all entities
         */
        @Override
        public List<Action> findAll() {
            return null;
        }

        /**
         * @param page pagable structure
         * @return pagable list
         */
        @Override
        public Page<Action> findAll(Pageable page) {
            return null;
        }

        @Override
        public Page<Action> findByName(String name, Pageable pageable) {
            return null;
        }

        /**
         * fetch specified entity according id;
         *
         * @param id entity id;
         * @return entity
         */
        @Override
        public Action findById(Long id) {
            return null;
        }

        /**
         * @param entities entity set to save
         * @return Iterable entity set
         */
        @Override
        public Iterable<Action> save(Iterable<Action> entities) {
            System.out.println("Hibernate: select next_val as id_val from hibernate_sequence for update");
            System.out.println("Hibernate: update hibernate_sequence set next_val= ? where next_val=?");
            System.out.println("Hibernate: insert into action (datecreated, datemodified, action_kind_id, description, name, point, id) values (?, ?, ?, ?, ?, ?, ?)");
            return null;
        }

        /**
         * save specified entity;
         *
         * @param entity entity for saving
         * @return saved domain entity
         */
        @Override
        public Action save(Action entity) {
            System.out.println("Hibernate: select next_val as id_val from hibernate_sequence for update");
            System.out.println("Hibernate: update hibernate_sequence set next_val= ? where next_val=?");
            System.out.println("Hibernate: insert into action (datecreated, datemodified, action_kind_id, description, name, point, id) values (?, ?, ?, ?, ?, ?, ?)");
            return null;
        }

        @Override
        public Action saveAndFlush(Action entity) {
            return null;
        }
    }

    public class ActionKindTreeManager implements ActionKindManager {
        /**
         * * delete entity according given id
         *
         * @param id entity id
         */
        @Override
        public void delete(Long id) {

        }

        @Override
        public void deleteAll(Long[] ids) {

        }

        /**
         * fetch all entities
         *
         * @return list for all entities
         */
        @Override
        public List<ActionKind> findAll() {
            return null;
        }

        /**
         * @param page pagable structure
         * @return pagable list
         */
        @Override
        public Page<ActionKind> findAll(Pageable page) {
            return null;
        }

        @Override
        public Page<ActionKind> findByName(String name, Pageable pageable) {
            return null;
        }

        /**
         * fetch specified entity according id;
         *
         * @param id entity id;
         * @return entity
         */
        @Override
        public ActionKind findById(Long id) {
            return null;
        }

        /**
         * @param entities entity set to save
         * @return Iterable entity set
         */
        @Override
        public Iterable<ActionKind> save(Iterable<ActionKind> entities) {
            System.out.println("Hibernate: select next_val as id_val from hibernate_sequence for update");
            System.out.println("Hibernate: update hibernate_sequence set next_val= ? where next_val=?");
            System.out.println("Hibernate: insert into action_kind (datecreated, datemodified, action_kind_id, description, name, point, id) values (?, ?, ?, ?, ?, ?, ?)");
            return null;
        }

        /**
         * save specified entity;
         *
         * @param entity entity for saving
         * @return saved domain entity
         */
        @Override
        public ActionKind save(ActionKind entity) {
            System.out.println("Hibernate: select next_val as id_val from hibernate_sequence for update");
            System.out.println("Hibernate: update hibernate_sequence set next_val= ? where next_val=?");
            System.out.println("Hibernate: insert into action_kind  (datecreated, datemodified, action_kind_id, description, name, point, id) values (?, ?, ?, ?, ?, ?, ?)");
            return null;
        }

        @Override
        public ActionKind saveAndFlush(ActionKind entity) {
            return null;
        }
    }
}
